package com.yueyang.sojourn.server.service.sojourn.order.inventory;

import com.yueyang.sojourn.server.model.po.SojournOrderInventory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author yemingxing
 * @summary
 * @Copyright (c) 2020, Yueyang Group All Rights Reserved.
 * @since 2020-04-05 12:31
 */
@Mapper
interface SojournOrderInventoryMapper {
    int insert(SojournOrderInventory record);

    SojournOrderInventory selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SojournOrderInventory record);

    int batchInsert(@Param("list") List<SojournOrderInventory> list);

    List<SojournOrderInventory> selectByMerchIdAndEffectDate(@Param("merchId") long merchId,
                                                             @Param("effectDateStart") Date effectDateStart,
                                                             @Param("effectDateEnd") Date effectDateEnd);

    List<SojournOrderInventory> selectByOrderSn(@Param("orderSn") String orderSn);

}